package unit4_1013.test3.cars;

public class Car extends Vehicle{

	private String model;//车型号
	
	public String getModel () {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public Car(String vehicleId, String brand,String model, int perRent) {
		super(vehicleId, brand, perRent);
		this.model=model;
	}

	public Car() {
		super();
	}

	@Override
	public float calcRent(int days) {
		float price=this.getPerRent()*days;
		if(days>7 && days<=30) {
			price*=0.9f;
		}else if(days>30 && days<=150) {
			price*=0.8f;
		}else if(days>150) {
			price*=0.7f;
		}
		return price;
	}

	@Override
	public String toString() {
		return super.toString()+",型号：" + model;
	}

	
	
	
}
